package ac.svn.accesscontrol.ui.helper.formatter;

import ac.svn.accesscontrol.store.SVNGroup;
import ac.svn.accesscontrol.ui.IListItemTextFormatter;

public class GroupItemNameFormatter implements IListItemTextFormatter {

	@Override
	public String formatString(Object msgObj) 
	{
		String formattedText = "";
		SVNGroup group = (SVNGroup) msgObj;
		formattedText = String.format("<HTML><b>%s</b> [%d]<br>%s</HTML>", group.getGroupName(),group.getGroupMembers().size(),group.getGroupMembers());
		return formattedText;
	}

	@Override
	public String formatToolTip(Object msgObject) 
	{
		return formatString(msgObject);
	}

}
